import http from "@/api";
import { ResPage } from "../interface";
import { LeaveWord } from "../interface/leaveWord";

export const getLeaveWordListApi = (pageNum: number = 1, pageSize: number = 10, wrapper?: Partial<LeaveWord>) => {
	return http.post<ResPage<LeaveWord>>(`/getLeaveWordList/${pageNum}/${pageSize}`, { wrapper });
};

export const deleteLeaveWordApi = (id: number) => {
	return http.delete<string>(`/leaveWord/${id}`);
};

export const updateLeaveWordApi = (leaveWord: Partial<LeaveWord>, id: number) => {
	return http.post<string>(`/leaveWord/update/${id}`, leaveWord);
};
